package com.gmail.blackdog1987.onedollar.dao;

import com.gmail.blackdog1987.onedollar.dao.hibernate.EntityHibernateDao;
import com.gmail.blackdog1987.onedollar.dao.hibernate.jdbc.BaseJdbcDao;
import com.gmail.blackdog1987.onedollar.entity.TAlipayCallbackEntity;
import com.gmail.blackdog1987.onedollar.entity.TWxpayCallbackEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository("wxPayCallbackDao")
public class WXPayCallbackDao extends EntityHibernateDao<TWxpayCallbackEntity> {
    @Autowired
    private BaseJdbcDao baseJdbcDao;

    public int check(String nonce_str) {
        return baseJdbcDao.getJdbcTemplate().queryForInt(" select count(1) from t_wxpay_callback where nonce_str = ? ", new Object[]{nonce_str});
    }
}
